project('tutorial', 'c')
#pymod = import('python')
#python = pymod.find_installation(get_option('python'))
#message(python.dependency())
#r = run_command('echo', '$pkg_config_dir')
#r = run_command('echo', '`pwd`')
#message(pkg_config_libdir)
module_srcdir = './'
module_srcs = files([
  module_srcdir + 'post.c',
  module_srcdir + 'postwin.c',
  ])
glib_compile_schemas = find_program('glib-compile-resources')
g_resource_xml = files([module_srcdir + 'post.gresource.xml'])
ui_src = files('postwin.ui')
resources_src = custom_target('resources.c',
  input:[g_resource_xml, ui_src],
  output:['resources.c'],
  command:[glib_compile_schemas, '@INPUT@',
    '--target', '@OUTPUT@',
    '--sourcedir', '../',
    '--generate-source'])
#message(resources_src)
cairo_dep = dependency('cairo')
glib_dep = dependency('glib-2.0')
gtk_dep = dependency('gtk+-3.0')
json_glib_dep = dependency('json-glib-1.0')
executable('8300post', 'main.c', module_srcs, resources_src,
  build_rpath : '/home/imch/ts/lib',
  install_rpath : '/home/imch/ts/lib',
  dependencies : [glib_dep, gtk_dep, cairo_dep, json_glib_dep])
